home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / cclib / include / stdlib.h < prev    next >
C/C++ Source or Header  |  1995-11-16  |  1KB  |  66 lines

  1. #ifndef STDLIB_H
  2. #define STDLIB_H 1
  3.  
  4.  
  5. #define EXIT_SUCCESS 0L
  6. #define EXIT_FAILURE 20L
  7.  
  8. #ifndef __SIZE_T
  9. #define __SIZE_T 1
  10. typedef unsigned long size_t;
  11. #endif
  12.  
  13. #ifdef ANSIC
  14.  
  15. double atof(char *);
  16. long atoi(char *);
  17. long atol(char *);
  18.  
  19. void *malloc(unsigned long);
  20. void *calloc(unsigned long, unsigned long);
  21. void *realloc(void *,unsigned long);
  22. void free(void *);
  23.  
  24. void exit(long);
  25. extern void (*exit_fcn)(void);
  26. void qsort(void *,unsigned long,unsigned long,long (*)(void *,void *));
  27. long setenv(char *name, char *value);
  28. char *getenv(char *name);
  29. #else
  30.  
  31. double atof();
  32. short atoi();
  33. long atol();
  34. void *malloc();
  35. void *calloc();
  36. void *realloc();
  37. void free();
  38. void exit();
  39. extern void (*exit_fcn)();
  40. void qsort();
  41. long setenv();
  42. char *getenv();
  43.  
  44. #endif
  45.  
  46. #define abs(X) (((X) < 0) ? -(X) : (X))
  47. #define lbs(X) (((X) < 0) ? -(X) : (X))
  48. #define atexit(FUNC) (exit_fcn = (FUNC))
  49. #define system(COMMAND) (Execute(COMMAND,0L,0L))
  50. #define abort() (exit(EXIT_FAILURE))
  51.  
  52. /*------------------------ TBD -----------------------------------
  53.  *
  54.  * double strtod(char *, char **);
  55.  * long strtol(char *, char **, int);
  56.  * unsigned long strtoul(char *,char **,int);
  57.  * int rand();
  58.  * void srand();
  59.  * void *bsearch(void *,void *,long,long, int (*)(void *, void *);
  60.  * div_t div(int,int);
  61.  * ldiv_t ldiv(long, long);
  62.  *-----------------------------------------------------------------*/
  63.  
  64. #endif
  65.  
  66.